import { IToolDropEnum } from '@/hooks/core/useMultipleTabs';

export interface IDescImageProps {
  desc: string;
  src: string;
  isRight?: boolean;
}

export interface IToolDropMenu {
  title: string;
  icon?: string;
  divided?: boolean;
  disabled?: boolean;
  command: IToolDropEnum | IUserDropEnum;
}

export type IUserDropMenu = IToolDropMenu;

export interface DynamicSelectOption {
  value: string;
  label: string;
}

export type DynamicRadioOption = DynamicSelectOption;

export enum DynamicItem {
  RADIO = 'DynamicRadio',
  SELECT = 'DynamicSelect',
  SELECTSUB = 'DynamicSelectSub',
  CHECKBOX = 'DynamicCheckbox',
  INPUT = 'DynamicInput',
  CAPTCHA = 'DynamicCaptcha',
  SMSCODE = 'DynamicSmsCode',
  DATAPICKER = 'DynamicDataPicker',
}

export interface DynamicFormOption {
  name: string;
  is: DynamicItem;
  label?: string;
  placeholder?: string;
  options?: DynamicSelectOption[] | DynamicRadioOption[];
  requiredField?: boolean;
  checkboxContent?: string;
  captchaUrl?: Recordable;
  imgClick?: Function;
  type?: string;
  sendSms?: Function;
  showPassword?: boolean;
  parentId?: number;
  [key: string]: unknown;
}

export enum IUserDropEnum {
  PROFILE = 'profile',
  LOGOUT = 'logout',
  REFRESH = 'refresh',
}
